package com.maochang.top.cglib;


import com.maochang.top.cglib.service.UserService;
import com.maochang.top.cglib.service.impl.UserServiceCglibProxy;
import com.maochang.top.cglib.service.impl.UserServiceImpl;

public class App {
    public static void main(String[] args) {
        UserService userService=UserServiceCglibProxy.createUserServiceCglibProxy(UserServiceImpl.class);
        /**
         * 方法拦截会对所有的方法进行增强
         * 需要设置选择性增强
         */
        System.out.println(userService);
        userService.save();
    }
}
